// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.

/// A dyn-compatible, crate-private version of [super::StorageControl].
#[async_trait::async_trait]
pub trait StorageControl: std::fmt::Debug + Send + Sync {
    async fn delete_bucket(
        &self,
        req: crate::model::DeleteBucketRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    async fn get_bucket(
        &self,
        req: crate::model::GetBucketRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Bucket>>;

    async fn create_bucket(
        &self,
        req: crate::model::CreateBucketRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Bucket>>;

    async fn list_buckets(
        &self,
        req: crate::model::ListBucketsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListBucketsResponse>>;

    async fn lock_bucket_retention_policy(
        &self,
        req: crate::model::LockBucketRetentionPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Bucket>>;

    async fn update_bucket(
        &self,
        req: crate::model::UpdateBucketRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Bucket>>;

    async fn compose_object(
        &self,
        req: crate::model::ComposeObjectRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Object>>;

    async fn delete_object(
        &self,
        req: crate::model::DeleteObjectRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    async fn restore_object(
        &self,
        req: crate::model::RestoreObjectRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Object>>;

    async fn get_object(
        &self,
        req: crate::model::GetObjectRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Object>>;

    async fn update_object(
        &self,
        req: crate::model::UpdateObjectRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Object>>;

    async fn list_objects(
        &self,
        req: crate::model::ListObjectsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListObjectsResponse>>;

    async fn rewrite_object(
        &self,
        req: crate::model::RewriteObjectRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::RewriteResponse>>;

    async fn move_object(
        &self,
        req: crate::model::MoveObjectRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Object>>;
}

/// All implementations of [super::StorageControl] also implement [StorageControl].
#[async_trait::async_trait]
impl<T: super::StorageControl> StorageControl for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn delete_bucket(
        &self,
        req: crate::model::DeleteBucketRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::delete_bucket(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_bucket(
        &self,
        req: crate::model::GetBucketRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Bucket>> {
        T::get_bucket(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn create_bucket(
        &self,
        req: crate::model::CreateBucketRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Bucket>> {
        T::create_bucket(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_buckets(
        &self,
        req: crate::model::ListBucketsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListBucketsResponse>> {
        T::list_buckets(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn lock_bucket_retention_policy(
        &self,
        req: crate::model::LockBucketRetentionPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Bucket>> {
        T::lock_bucket_retention_policy(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_bucket(
        &self,
        req: crate::model::UpdateBucketRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Bucket>> {
        T::update_bucket(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn compose_object(
        &self,
        req: crate::model::ComposeObjectRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Object>> {
        T::compose_object(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_object(
        &self,
        req: crate::model::DeleteObjectRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::delete_object(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn restore_object(
        &self,
        req: crate::model::RestoreObjectRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Object>> {
        T::restore_object(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_object(
        &self,
        req: crate::model::GetObjectRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Object>> {
        T::get_object(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_object(
        &self,
        req: crate::model::UpdateObjectRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Object>> {
        T::update_object(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_objects(
        &self,
        req: crate::model::ListObjectsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListObjectsResponse>> {
        T::list_objects(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn rewrite_object(
        &self,
        req: crate::model::RewriteObjectRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::RewriteResponse>> {
        T::rewrite_object(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn move_object(
        &self,
        req: crate::model::MoveObjectRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Object>> {
        T::move_object(self, req, options).await
    }
}
